package com.dj.boot.controller;

import com.dj.boot.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @Autowired
    Person person;

    @GetMapping("/hello")
    public String handle01(){
        return "Hello world";
    }

    @GetMapping("/person")
    public String handle02(){
        return person.toString();
    }
}
